
<template>
	<el-dialog title="" visible :show-close="false" :modal-append-to-body="false" class="wrap" size="tiny">
		<div class="bt">详情</div>
        <i class="el-icon-close close" @click="cancel" style="color: white;z-index: 99;"></i>
		<el-form label-width="100px" class="form">
			<!--<el-form-item label="工号">
				  <el-input v-model="form.gh" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>-->
			<el-form-item label="借用数量">
				  <el-input v-model="form.lysl" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="借用时间">
				  <el-input v-model="form.lysj" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="借用审核人">
				  <el-input v-model="form.lyjsrmc" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="借用原因">
				  <el-input v-model="form.lyyy" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="是否归还">
				  <el-input v-model="form.isghzt" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="归还数量">
				  <el-input v-model="form.tlsl" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="未还数量">
				  <el-input v-model="form.wghsl" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="归还时间">
				  <el-input v-model="form.tlsj" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="归还审核人">
				  <el-input v-model="form.tljsrmc" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="归还说明">
				  <el-input v-model="form.tlyy" :readonly="true"  icon="info" class="select-block"></el-input>
			</el-form-item>
		</el-form>
		<el-button type="primary" class="submit" @click="cancel">确定</el-button>
	</el-dialog>
</template>

<script type="text/javascript">
	import qs from 'qs'
	export default {
		props: ['params'],
		data() {
			return {
				form: {
					gh :'',
					lysl :'',
					lysj :'',
					lyjsrmc :'',
					lyyy :'',
					isghzt :'',
					tlsl :'',
					tlsj :'',
					wghsl:'',
					tljsrmc :'',
					tlyy :'',
					id: ''
				},
			}
		},
		created() {
           this.form.id=this.params.row.id;
			this.loadinfo();
		},
		methods: {
			loadinfo(){
				 var logininfo = JSON.parse(localStorage.logininfo) ;
				 var params3 = qs.stringify({
					 xxid:logininfo.xxid,
					 yhid:logininfo.id,
					 id:this.form.id
				 });
				 this.axios.post(this.$store.state.api+'wplytl/info',params3)
				 .then( res =>  {
							this.form=res.data.data
					 }).catch(res => {
						 this.$message.warning("服务器异常");
			 			 this.$emit('close', { type: 'info', cancel: true });
					 })
			},
			cancel() {
				this.$emit('close', { type: 'info', cancel: true })
			}
		}
	}
</script>

<style lang="less" scoped>
	.wrap {
		text-align: center;
	}
	.bt{
			position: absolute;
			width: 100%;
			height: 50px;
			margin: 0 auto;
			top:0;
			left:0;
			background: #50BFFF;
			margin-bottom: 20px;
			color:white;
			text-align:left;
			line-height: 50px;
			font-size: 17px;
			padding-left: 15px;
		}
	.form {
		text-align: left;
		margin-top: 20px;
	}
	 .input {
            width: 300px;
            display: inline-block;
        }

	.select-block {
		display: block;
	}

	.submit {
		width: 120px;
	}
</style>
